/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package qs.crm.modules.client.orders.service.mapstruct;

import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
import qs.crm.base.BaseMapper;
import qs.crm.modules.client.orders.domain.Orders;
import qs.crm.modules.client.orders.service.dto.OrdersDto;

/**
* @website https://eladmin.vip
* @author tong
* @date 2023-06-01
**/
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface OrdersMapper extends BaseMapper<OrdersDto, Orders> {
//    @Select("SELECT cust_no,cust_name,cust_manager_id,cust_manager_name,cust_status,odr_date FROM (SELECT cust_no,cust_name,cust_manager_id,cust_manager_name,cust_status,jidu,odr_date FROM cst_customer a LEFT JOIN (select orders.odr_customer,odr_date,  TIMESTAMPDIFF(QUARTER,MAX(odr_date),CURDATE()) AS jidu   from orders group by odr_customer) b  ON a.cust_name=b.odr_customer  HAVING IFNULL(jidu,12) >= 0) m")
//    List<CstCustomer> getCList();
}